package com.pvdnc.tapkit.chat;

import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;

public class MessageEntity implements Parcelable {
    public Bitmap mHeadImg;

    public String mName;

    public int mLevel;

    public String mContent;

    public MessageEntity(){

    }

    protected MessageEntity(Parcel in) {
        mHeadImg = in.readParcelable(Bitmap.class.getClassLoader());
        mName = in.readString();
        mLevel = in.readInt();
        mContent = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(mHeadImg, flags);
        dest.writeString(mName);
        dest.writeInt(mLevel);
        dest.writeString(mContent);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<MessageEntity> CREATOR = new Creator<MessageEntity>() {
        @Override
        public MessageEntity createFromParcel(Parcel in) {
            return new MessageEntity(in);
        }

        @Override
        public MessageEntity[] newArray(int size) {
            return new MessageEntity[size];
        }
    };
}
